package com.mzj.saas.mservice.property.common;

/**
 * @author hikari
 * @since 2021-05-14
 */
public enum HouseTypeEnum {
    PUBLIC_RENTAL_HOUSING(1, "公租房"),
    PROPERTY_HOUSING(2, "物业房产");

    public final int type;
    public final String typeName;

    HouseTypeEnum(int type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public static String getTypeName(int type) {
        for (HouseTypeEnum value : HouseTypeEnum.values()) {
            if (value.getType() == type) {
                return value.typeName;
            }
        }
        return null;
    }

    public int getType() {
        return this.type;
    }
}
